package org.sy.lab.Java7并发编程实战.七定制并发类.九实现基于优先级的传输队列;

public class Producer implements Runnable {
	private MyPriorityTransferQueue<Event> buffer;
	public Producer(MyPriorityTransferQueue<Event> buffer) {
		this.buffer = buffer;
	}
	@Override
	public void run() {
		for(int i=0; i<100; i++) {
			Event event = new Event(Thread.currentThread().getName(), i);
			buffer.put(event);
		}
	}
}
